import { StyleSheet, Text, View } from 'react-native';
import React from 'react';
import WebView from 'react-native-webview';
import { useTranslation } from 'react-i18next';
import { NavBarHeader } from '~/components';
import { appStore } from '~/store';
import { baseURL } from '!/app.json';

export default function AiChat() {
    const { t } = useTranslation();
    const url = `${baseURL}wxdata/aiManagement/aiChat.html?local=${appStore.app.language}`;
    return (
        <View style={styles.container}>
            <NavBarHeader title={t('AiChat.title')} />
            <WebView
                style={styles.container}
                domStorageEnabled={true}
                javaScriptEnabled={true}
                incognito={true}
                textZoom={100}
                startInLoadingState={true}
                source={{
                    uri: `${baseURL}wxdata/aiManagement/aiChat.html?local=${appStore.app.language}`,
                }}
            />
        </View>
    );
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
    },
});
